<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${ctxPath}/appointment/list" method="post">
        <input type="hidden" name="pageSize" value="${appointmentList.pageSize!}">
        <input type="hidden" name="pageCurrent" value="${appointmentList.pageNum!}">

        <div class="bjui-searchBar">
            <label>用户手机：</label><input type="text" value="${pojo.userPhone!}" name="userPhone" class="form-control" data-rule="number;range[0~];length(~11)">&nbsp;
            <label>资料标题：</label><input type="text" value="${pojo.dataTitle!}" name="dataTitle" class="form-control" data-rule="length(~20)">&nbsp;
            <label>预约状态：</label>
            <select name="status" data-toggle="selectpicker">
                @if(isEmpty(pojo.status)){
                <option value=""  selected>所有</option>
                <option value="0"> 未预约</option>
                <option value="1"> 已预约 </option>
                @}else if(pojo.status == 0){
                <option value="">所有</option>
                <option value="0" selected> 未预约</option>
                <option value="1"> 已预约 </option>
                @}else if(pojo.status == 1){
                <option value="">所有</option>
                <option value="0"> 未预约</option>
                <option value="1"  selected> 已预约 </option>
                @}
            </select>&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询</a>
            &nbsp;
            <div class="pull-right">
                <div class="btn-group">
                    <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" data-icon="copy">复选框-批量操作<span class="caret"></span></button>
                    <ul class="dropdown-menu right" role="menu">
                        <li><a href="${ctxPath}/appointment/excel" data-toggle="doexport" data-confirm-msg="确定要导出信息吗？">导出<span style="color: green;">当前页</span></a></li>
                        <li><a href="${ctxPath}/appointment/update" data-toggle="doajaxchecked" data-confirm-msg="确定要删除选中项吗？" data-idname="ids" data-group="ids">删除<font color="red">选中</font>行</a></li>
                        <li><a href="${ctxPath}/appointment/do" data-toggle="doajaxchecked" data-confirm-msg="确定要预约选中项吗？" data-idname="ids" data-group="ids">预约<font color="blue">选中</font>行</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="true">
        <thead>
        <tr>
            <th align="center" width="35">编号</th>
            <th align="center" width="60">用户电话</th>
            <th align="center" width="60">是否领取</th>
            <th align="center" width="80">是否收藏</th>
            <th align="center" width="120">资料标题</th>
            <th align="center" width="120">资料学科名字</th>
            <th align="center" width="120">创建时间</th>
            <th align="center" width="80">预约状态</th>
            <th align="center" width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
            <th align="center" width="80">操作</th>
        </tr>
        </thead>
        <tbody>
        @for(appointment in appointmentList.list){
        <tr data-id="${appointmentLP.index}">
            <td align="center">${appointment.id!}</td>
            <td align="center">${appointment.userPhone!,xss}</td>
            @if(isEmpty(appointment.isReceived)){
            <td align="center">N/A</td>
            @}else if(appointment.isReceived == 0){
            <td align="center" style="color: red">未领取</td>
            @}else if(appointment.isReceived == 1){
            <td align="center" style="color: green">已领取</td>
            @}
            @if(isEmpty(appointment.isFavorite)){
            <td align="center">N/A</td>
            @}else if(appointment.isFavorite == 0){
            <td align="center" style="color: red">未收藏</td>
            @}else if(appointment.isFavorite == 1){
            <td align="center" style="color: green">已收藏</td>
            @}
            <td align="center">${appointment.dataTitle!"N/A",xss}</td>
            <td align="center">${appointment.categoryName!"N/A",xss}</td>
            <td align="center">${appointment.createTime!"N/A",dateFormat="yyyy-MM-dd HH:mm:ss"}</td>
            @if(isEmpty(appointment.status)){
            <td align="center">N/A</td>
            @}else if(appointment.status == 0){
            <td align="center" style="color: red">未预约</td>
            @}else if(appointment.status == 1){
            <td align="center" style="color: green">已预约</td>
            @}
            <td align="center"><input type="checkbox" name="ids" data-toggle="icheck" value="${appointment.id!}"></td>
            <td align="center">
                @if(appointment.status == 0){
                <a href="${ctxPath}/appointment/do?ids=${appointment.id!}" class="btn btn-blue" data-toggle="doajax" title="预约" data-confirm-msg="确定要预约该行信息吗？">预约</a>&nbsp;
                @}
                <a href="${ctxPath}/appointment/update?ids=${appointment.id!}" class="btn btn-red" data-toggle="doajax" title="删除" data-confirm-msg="确定要删除该行信息吗？">删除</a>
            </td>
        </tr>
        @}
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>
        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                <option value="30">30</option>
                <option value="60">60</option>
                <option value="120">120</option>
                <option value="150">150</option>
            </select>
        </div>
        <span>&nbsp;条，共 ${appointmentList.total!} 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="${appointmentList.total!}" data-page-size="30" data-page-current="1">
    </div>
</div>